<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>孟老师QQ-574549426-暗号：JAVA</title>
    <script src="vue.js" type="text/javascript"></script>
    <style>
      .active{background-color: red}
    </style>
</head>
<body>
    <div id="app">
        <p v-bind:class="{active:isActive}">学JAVA找孟老师</p>
        <!--v-bind缩写-->
        <p :class="{active:isActive}">学JAVA找孟老师</p>
    </div>
<script type="text/javascript">
    var vm=new Vue({
        el:"#app",
        data:{
            isActive:false
        }
    })
</script>
</body>
</html>